home *** CD-ROM | disk | FTP | other *** search
- property pSprite, spriteNum, pSelectColor, pNormColor
- global lastpicked, lastmem, wholelist, wholelist2, lasttile, gsel, currentscope
-
- on beginSprite me
- pSprite = sprite(spriteNum)
- pSelectColor = rgb(74, 149, 149)
- pNormColor = rgb(0, 0, 0)
- pSprite.member.scrollTop = pSprite.member.linePosToLocV(0)
- repeat with i = 1 to pSprite.member.paragraph.count
- pSprite.member.paragraph[i].color = pNormColor
- end repeat
- end
-
- on mouseDown me
- pointClicked = the mouseLoc
- if pSprite.pointToLine(pointClicked) <> -1 then
- if pSprite.member.line[pSprite.pointToLine(pointClicked)] <> EMPTY then
- member("question in focus").text = pSprite.member.line[pSprite.pointToLine(pointClicked)]
- pSprite.member.line[pSprite.pointToLine(pointClicked)].color = pSelectColor
- puppetSound(4, "select clue")
- if pSprite.member.name contains "across" then
- if not voidp(lasttile) then
- if currentscope = #across then
- repeat with i = 1 to lasttile.ptilelist.count
- lasttile.ptilelist[i].member = lasttile.ptilelist[i].pnorm
- end repeat
- else
- repeat with i = 1 to lasttile.ptilelist2.count
- lasttile.ptilelist2[i].member = lasttile.ptilelist2[i].pnorm
- end repeat
- end if
- end if
- currentscope = #across
- ogDelim = the itemDelimiter
- the itemDelimiter = "."
- ass = pSprite.member.line[pSprite.pointToLine(pointClicked)].item[1]
- the itemDelimiter = ogDelim
- gsel = wholelist[ass][1]
- wholelist[ass][1].member = wholelist[ass][1].pdown
- lasttile = gsel
- repeat with i = 1 to wholelist[ass].count
- if wholelist[ass][i] = gsel then
- next repeat
- end if
- wholelist[ass][i].member = wholelist[ass][i].pselect
- end repeat
- else
- if not voidp(lasttile) then
- if currentscope = #across then
- repeat with i = 1 to lasttile.ptilelist.count
- lasttile.ptilelist[i].member = lasttile.ptilelist[i].pnorm
- end repeat
- else
- repeat with i = 1 to lasttile.ptilelist2.count
- lasttile.ptilelist2[i].member = lasttile.ptilelist2[i].pnorm
- end repeat
- end if
- end if
- currentscope = #down
- ogDelim = the itemDelimiter
- the itemDelimiter = "."
- ass = pSprite.member.line[pSprite.pointToLine(pointClicked)].item[1]
- the itemDelimiter = ogDelim
- gsel = wholelist2[ass][1]
- wholelist2[ass][1].member = wholelist2[ass][1].pdown
- lasttile = gsel
- repeat with i = 1 to wholelist2[ass].count
- if wholelist2[ass][i] = gsel then
- next repeat
- end if
- wholelist2[ass][i].member = wholelist2[ass][i].pselect
- end repeat
- end if
- if not voidp(lastpicked) and not voidp(lastmem) then
- if lastpicked <> pSprite.pointToLine(pointClicked) then
- lastmem.line[lastpicked].color = pNormColor
- end if
- end if
- lastmem = pSprite.member
- lastpicked = pSprite.pointToLine(pointClicked)
- end if
- end if
- end
-
- on fixshit me, myques
- pSprite.member.line[myques].color = pSelectColor
- pSprite.member.scrollTop = pSprite.member.linePosToLocV(myques) - 20
- if not voidp(lastpicked) and not voidp(lastmem) then
- if lastpicked <> myques then
- lastmem.line[lastpicked].color = pNormColor
- end if
- end if
- lastmem = pSprite.member
- lastpicked = myques
- end
-